/*
 * badinput.cpp
 *
 *  Created on: Sep 1, 2013
 *      Author: cyper.yin
 */
#include <iostream>

using namespace std;
void showme(double *p ,int n);
int main_badinput(int argc, char **argv) {
	double x = 12.0;
	double *p = &x;
	showme(p,1);
	showme(&x,1);

	double y[] = {1,2,3};
	double *p2 = y;
	showme(p2, 3);
	showme(y,3);

	return 0;
}
void showme(double *p ,int n){
	cout << "*p=" << *p << endl;
	cout << "p[0]=" << p[0] << endl;
}




